package org.pp.vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import java.math.BigDecimal;


@Setter
@Getter
public class MiniappGoodsVo {

    @Schema(description = "商品id")
    @TableId(value = "goods_id", type = IdType.AUTO)
    private Long goodsId;

    @Schema(description = "商品名称")
    private String name;

    @Schema(description = "冗余分类id")
    @TableField(typeHandler = JacksonTypeHandler.class)
    private Long[] catIds;

    @Schema(description = "封面")
    private String cover;

    @Schema(description = "销量，这个字段是sku销量之和，卖出去后更新")
    private Integer sales;

    @Schema(description = "售价（sku的最小售价）")
    private BigDecimal price;

    @Schema(description = "幻灯片图片")
    @TableField(typeHandler = JacksonTypeHandler.class)
    private String[] sliders;

    @Schema(description = "介绍")
    private String intro;
}
